class StateManager {
  constructor(ele) {
    this.ele = {
      wapper: ele,
      date: ele.querySelector('.state-date'),
      dateText: ele.querySelector('.state-date .box-text'),
      money: ele.querySelector('.state-money'),
      moneyText: ele.querySelector('.state-money .box-text'),
    };
    this._today = 0;
    this._money = 0;
  }

  get today() {
    return this._today;
  }

  set today(val) {
    this._today = val;
    this.ele.dateText.innerText = `W${Number.parseInt(val / 7) + 1} D${
      (val % 7) + 1
    }`;
  }

  get money() {
    return this._money;
  }

  set money(val) {
    this._money = val;
    this.ele.moneyText.innerText = val;
  }
}
